package com.geeklan.smart.data.remote.user;

import com.geeklan.smart.data.model.ApiResponse;
import com.geeklan.smart.data.model.LoginResponse;
import com.geeklan.smart.data.model.User;

import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface UserApiService {
    @GET("your_endpoint")
    Call<User> getUser(@Query("param") String param);

    @Headers("Content-Type: application/json")
    @POST("user/login")
    Call<ApiResponse<LoginResponse>> login(@Body User requestBody);

    @Headers("Content-Type: application/json")
    @POST("user/register")
    Call<ApiResponse> register(@Body User requestBody);

    @Headers("Content-Type: application/json")
    @POST("user/updatePassword")
    Call<ApiResponse> updatePassword(@Body User requestBody);

    @Headers("Content-Type: application/json")
    @POST("user/tokenLogin")
    Call<ApiResponse<User>> tokenLogin(@Body User user);

    @Headers("Content-Type: application/json")
    @POST("user/getUserInfoByToken")
    Call<Void> getUserInfoByToken(@Body User requestBody);

    @POST("user/updateUserInfo")
    Call<ApiResponse> updateUserInfo(@Body User requestBody);

    @GET("user/getUserInfoByToken")
    Call<ApiResponse<User>> getUserInfoByToken();

    @Headers("Content-Type: application/json")
    @POST("user/removeUser")
    Call<ApiResponse> removeUser(@Body Map<String, Object> requestBody);
}

